package com.zmj.solr.vo;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.solr.core.mapping.Indexed;
import org.springframework.data.solr.core.mapping.SolrDocument;

import java.io.Serializable;

@Data
@SolrDocument(solrCoreName = "lhc_core")
public class SolrProduct implements Serializable {

    private static final long serialVersionUID = -5923827922796539863L;

    @Id
    @Indexed("id")
    private String id;

    @Indexed("name1")
    private String  name1;

    @Indexed("brandName")
    private String  brandName;

    @Indexed("productCateId")
    private int  productCateId;

    @Indexed("cId")
    private String  cId;

    @Indexed("keyword")
    private String  keyword;

    @Indexed("price")
    //用double示例
    private double price;


    public SolrProduct() {
    }

    public SolrProduct(String id, String name1, String brandName, String keyword, double price,int productCateId,String cId) {
        this.id = id;
        this.name1 = name1;
        this.brandName = brandName;
        this.keyword = keyword;
        this.price = price;
        this.productCateId = productCateId;
        this.cId = cId;
    }
}
